package org.hackystat.devcathlon.ui.page.matches.invitations;

import org.apache.wicket.behavior.SimpleAttributeModifier;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.hackystat.devcathlon.ui.DevcathlonSession;
import org.hackystat.devcathlon.ui.page.DevcathlonBasePage;
import org.hackystat.devcathlon.ui.page.matches.MatchesSession;

/**
 * Implements the Match Invitations submenu page.
 * 
 * @author Ka Hung Phillip Lau
 * 
 */
public class InvitationsPage extends DevcathlonBasePage {
  /** Support serialization. */
  private static final long serialVersionUID = 1L;
  /** The session state for this page. */
  private MatchesSession session = DevcathlonSession.get().getMatchesSession();

  /**
   * Creates the Invitations submenu page. This page and its subpages contain information about
   * matches.
   */
  public InvitationsPage() {
    add(new WebMarkupContainer("body") {
      private static final long serialVersionUID = 1L;

      @Override
      public boolean isTransparentResolver() {
        return true;
      }

      @Override
      protected void onComponentTag(ComponentTag tag) {
        tag.put("class", "section-3");
      }
    });

    // Make the tab corresponding to this page bold.
    get("InvitationsLink").add(new SimpleAttributeModifier("class", "selected"));

    //****************************************************
    session.getSelectedMatch(); 
    add(new InvitationListPanel("listPanel"));
    add(new InvitationDetailPanel("detailPanel"));
    


  }
}
